home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * SiteDlg.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
-
- var IS = IS_getLibHandle();
- if (!IS_isModuleInitialized("IS.NOF.DIALOGS.SiteDlg"))
- {
-
- /****h* NOF_JavaScript_Library/NOF.DIALOGS.SiteDlg
- *
- * NAME
- * NOF.DIALOGS.SiteDlg
- *
- * DESCRIPTION
- *
- * The <code>SiteDlg</code> class
- * External dependencies: NOF.App, NOF.Page
- ****/
-
- /**
- * constructor
- **/
- function DIALOGS_SiteDlg() {
- this.__proto__ = DIALOGS_SiteDlg.prototype;
- }
- {
- var member = DIALOGS_SiteDlg.prototype;
- member.CLASS_NAME = "DIALOGS.SiteDlg";
-
- var method = DIALOGS_SiteDlg.prototype;
- /*
- NOF.Page selectPage(int pX, int pY, int pWidth, int pHeight)
- String selectSiteFileToSave(String pName)
- String selectSiteFileToOpen(String pName)
- boolean createNewSiteFromTemplate()
- boolean createNewBlankSite()
- */
-
- /**
- * Allows the user to select for open a Fusion site file in a dialog.
- * @param pName specifies a suggested name.
- * @return the path of the selected site file. If the user cancels the operation
- * the function returns an empty string.
- **/
- method.selectSiteFileToOpen = function (/*String*/ pName) {
- return NOF.App.getFSIApp().SelectSiteFile(pName, true);
- }
-
-
- /**
- * Allows the user to select for saving a Fusion site file in a dialog.
- * @param pName specifies a suggested name.
- * @return the path of the selected site file. If the user cancels the operation
- * the function returns an empty string.
- **/
- method.selectSiteFileToSave = function (/*String*/ pName) {
- return NOF.App.getFSIApp().SelectSiteFile(pName, false);
- }
-
- /**
- * Opens a dialog that displays the current site structure that allows the user to
- * select a node (page) within the site.
- * The upper left corner is located at the x, y coordinates defined by pX and pY.
- * The width and height of the dialog is defined by pWidth and pHeight.
- * @param pX
- * @param pY
- * @param pWidth
- * @param pHeight
- * @return the selected Page.
- **/
- method.selectPage = function (/*int*/ pX,/*int*/ pY,/*int*/ pWidth,/*int*/ pHeight) {
- var retNode = null;
- var selPage = NOF.App.getFSIApp().SelectNode(pX, pY, pWidth, pHeight);
- if (selPage != null) {
- retNode = new NOF.Page();
- retNode.fsiNode = selPage;
- }
- return retNode;
- }
-
- /**
- * Opens a file selection dialog where you can select a template, and then a file selection box
- * is opened where you can select the name of your new site.
- *
- * @return true if the operation is successful.
- **/
- method.createNewSiteFromTemplate = function () {
- return NOF.App.getFSIApp2().NewSiteFromTemplate();
- }
-
- /**
- * Opens a file selection dialog where you can select the name of your new site.
- *
- * @return true if the operation is successful.
- **/
- method.createNewBlankSite = function () {
- return NOF.App.getFSIApp2().NewBlankSite();
- }
- }
- DIALOGS.__proto__.SiteDlg = DIALOGS_SiteDlg;
- }